﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;

public partial class UserControl_author : System.Web.UI.UserControl
{
    protected string strMoTa = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        string strNameKhongDau = clsCommon.fncGetRoute(this.Page, "param1");
        DataTable dt = clsAuthor.fncGetByTenKhongDau(strNameKhongDau);
        if (dt == null) return;
        if (dt.Rows.Count <= 0) return;
        ltr_Name.Text = OsPortal.oStringHelper.fncCnvNullToString(dt.Rows[0]["at_name"]);
        ltrMoTa.Text = OsPortal.oStringHelper.fncCnvNullToString(dt.Rows[0]["at_mota"]);

        // Tag meta title + des Facebook
        HtmlMeta tag = new HtmlMeta();
        tag.Attributes.Add("property", "og:title");
        tag.Content = OsPortal.oStringHelper.fncCnvNullToString(dt.Rows[0]["at_name"]); ;
        Page.Header.Controls.Add(tag);

        HtmlMeta tag2 = new HtmlMeta();
        tag2.Attributes.Add("property", "og:description");
        strMoTa = OsPortal.oStringHelper.fncCnvNullToString(dt.Rows[0]["at_name"]) +" - nghikhac.com";
        tag2.Content = strMoTa;
        Page.Header.Controls.Add(tag2);
        // END Tag meta title + des Facebook

    }
}